package com.jk.mapper;


import com.jk.bean.*;
import com.jk.bean.Bks;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    List<User> queryUser(User user);

    @Select("select * from t_user where state > 0")
    List<User> queryUser1();

    @Delete("delete from t_user where userId in (${ids})")
    void delUser(@Param("ids") String ids);

    @Select("select * from t_user where userId = #{id}")
    User queryUserById(String id);

    void updateUser(User user);

    @Select("select * from staff")
    List<Staff> queryStaff();

    @Delete("delete from staff where staffId in (${id})")
    void delStaff(@Param("id") String ids);

    void addStaff(Staff staff);

    void updateStaff(Staff staff);

    @Select("select * from staff where staffId = #{id}")
    Staff queryStaffById(String id);

    @Update("update t_user set state = #{state} where userId = #{userId} ")
    void updateUserState(User user);

    @Select("select * from staff where staffId in (${id})")
    List<Staff> queryPoi(@Param("id") String ids);

    int selectByName(String name);

    void updateUserByName(Staff userResord);

    List<TuTu> queryYuLeSP();

    void tongGuo(@Param("ids") String ids);

    void JuJueTuiJian(@Param("ids") String ids);

    List<GuangGao> queryGuangGaoInfo();

    void updateGGW(@Param("gg") GuangGao gg);

     @Select("select * from t_user where userId in (${id})")
    List<User> queryUserPoi(@Param("id") String ids);

     @Update("update t_user set status = #{status} where userId = #{userId}")
    void updateStatus(User user);

    List<Bks> queryDKS();

    void deleteDKS(@Param("ids") String ids);

    @Select("select * from emp")
    List<Emp> exportExcel();
}
